package cn.sdc.sfw.dao.exception;

import java.sql.SQLException;

import cn.sdc.sfw.exception.SfwRuntimeException;

public class DaoException extends SfwRuntimeException {

	public final static int PARSE_ERROR = 1;
	public final static int BEAN_CLASS_NULL = 2;
	public final static int PROPERTY_NOT_FOUND = 3;
	public final static int SQL_RUN_ERROR = 11;
	public static final int SQL_BLANK_ERROR = 12;
	public final static int CONNECTION_OPEN_ERROR = 21;
	public final static int CONNECTION_CLOSE_ERROR = 22;
	public static final int CONNECTION_STATEMENT_ERROR = 23;
	public static final int CONNECTION_CALL_ERROR = 24;
	public static final int CONNECTION_GET_METADATA_ERROR = 25;
	public static final int CONNECTION_COMMIT_ERROR = 26;
	public static final int CONNECTION_ROLLBACK_ERROR = 27;
	public static final int EXCCUTE_QUERY_ERROR = 31;
	public static final int EXCCUTE_UPDATE_ERROR = 32;
	public static final int NO_RESULT_SET_HANDLER = 41;
	public final static int OTHER_ERROR = 9999;
	
	int etype;
	
	public DaoException(String messageCode, Object[] args, Throwable cause) {
		super(messageCode, args, cause);
	}
	
	public DaoException(int exceptionType) {
		super("");
	}
	
	public DaoException(int exceptionType, Object[] args) {
		super("");
	}
	
	public DaoException(Throwable cause, int exceptionType) {
		super("");
	}
	
	public DaoException(String messageCode,int exceptionType) {
		super(messageCode);
	}
	
	public DaoException(SQLException ex) {
		super("");
		ex.printStackTrace();
	}

}
